package org.dtrd.modules.archive.entity.bean.lifeway;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.dtrd.modules.archive.entity.po.DtrdEntRdArchiveLifeway;

/**
 * @author : qiannai
 * @date: 2022/8/11 16:21
 * @describe : 吸烟情况接口保存
 */
@Data
@ApiModel(value = "吸烟情况", description = "吸烟情况表单")
public class LifewaySmokingDTO {

    private Integer dataId;

    @ApiModelProperty("患者ID")
    private Integer patientId;

    @ApiModelProperty("吸烟史 是-1，否-2，已戒烟-3")
    private Integer smoking;

    @ApiModelProperty("吸烟年份")
    private Integer smokingYear;

    @ApiModelProperty("吸烟量")
    private Integer smokingAmount;

    @ApiModelProperty("已戒烟年份")
    private Integer unSmokingYear;

    @ApiModelProperty("起床后多久吸烟SM4")
    private Integer smokingAfterGettingUp;

    @ApiModelProperty("是否很难控制吸烟需求SM5")
    private Integer isControlSmoking;

    @ApiModelProperty("最不愿意放弃哪支烟SM6")
    private Integer whichCigaretteGiveUp;

    @ApiModelProperty("醒来后第一个小时是否比其它时间段吸烟多SM7")
    private Integer isSmokingMoreInFirst;

    @ApiModelProperty("卧病在床是否吸烟SM8")
    private Integer isSmokingInBed;

    @ApiModelProperty("吸烟情况评分SM")
    private Integer smokingHabitsScore;

    @ApiModelProperty("吸烟情况总结SM")
    private String smokingHabitsComment;

    public LifewaySmokingDTO parseFromPo(DtrdEntRdArchiveLifeway po){
        dataId = po.getDataId();
        patientId = po.getPatientId();
        smoking = po.getSmoking();
        smokingYear = po.getSmokingYear();
        smokingAmount = po.getSmokingAmount();
        unSmokingYear = po.getUnSmokingYear();
        smokingAfterGettingUp = po.getSmokingAfterGettingUp();
        isControlSmoking = po.getIsControlSmoking();
        whichCigaretteGiveUp = po.getWhichCigaretteGiveUp();
        isSmokingMoreInFirst = po.getIsSmokingMoreInFirst();
        isSmokingInBed = po.getIsSmokingInBed();
        smokingHabitsScore = po.getSmokingHabitsScore();
        smokingHabitsComment = po.getSmokingHabitsComment();
        return this;
    }

}
